<!DOCTYPE html>
<html layout:decorate="~{layout}" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout">

<head>
    <meta content="IE=edge" http-equiv="X-UA-Compatible"/>
    <meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport"/>

    <title th:text="#{cas.mfa.googleauth.pagetitle}">Google Authentication Registration Review View</title>
    <link href="../../static/css/cas.css" rel="stylesheet" th:remove="tag"/>
</head>

<body id="cas">
<main class="container mt-3 mb-3" role="main">
    <div class="mdc-card p-4 m-auto w-lg-66" id="login" layout:fragment="content">
        <h3 th:text="#{screen.authentication.gauth.register}">Your account is not registered. Use the below settings
            to
            register your device with CAS.</h3>

        <form class="fm-v clearfix" id="fm1" method="post" th:action="@{/login}">
            <div class="d-flex flex-column align-items-center">
                <img th:src="@{/otp/qrgen(key=${keyUri})}"/>
                <div class="my-2">
                    <p th:utext="#{screen.authentication.gauth.key(${key.getSecretKey()})}">Secret key to register
                        is...</p>
                </div>

                <div class="border-rounded d-flex align-items-start mb-4 px-4">
                    <p class="mr-2">Scratch Codes:</p>
                    <ul class="">
                        <li th:each="code : ${key.getScratchCodes()}" th:text="${code}">code</li>
                    </ul>
                </div>
                <input name="_eventId" type="hidden" value="submit"/>
                <div class="d-flex justify-content-center">
                    <button accesskey="l" class="mdc-button mdc-button--raised mr-2" name="submit" value="Register">
                        <span class="mdc-button__label" th:text="#{screen.welcome.button.register}">Register</span>
                    </button>
                    <button accesskey="p" class="mdc-button mdc-button--raised mr-2" name="print"
                            onclick="window.print();"
                            type="button">
                        <span class="mdc-button__label" th:text="#{screen.welcome.button.print}">Print</span>
                    </button>
                    <button accesskey="c" class="mdc-button mdc-button--outlined" name="back"
                            onclick="location.href = location.href;" th:value="#{screen.pm.button.cancel}"
                            type="button"
                            value="Cancel">
                        <span class="mdc-button__label" th:text="#{screen.pm.button.cancel}">Cancel</span>
                    </button>
                </div>
            </div>
            <input name="execution" th:value="${flowExecutionKey}" type="hidden"/>
        </form>
    </div>
</main>
</body>

</html>